How do I retain/copy a symbol between attributes and dxl.
Specifically I have an attribute that defines a range as pi/2. (using the math symbol for pi)
That imported and displays quite happily.
I have a dxl column that needs to merge that attribute and another.
How do I get the merged data to show the pi symbol? all I get is p/2.
I can see in the RTF that the fontTable is Symbol.
Is there an easier way than breaking the source string into parts and rebuilding it piece by piece?
Bob Swan
Bob_Swan - Thu Feb 21 09:15:40 EST 2013 |
|
Re: Copy / retain symbols in dxl. SystemAdmin - Thu Feb 21 11:54:08 EST 2013
Hi
Try:
string myPiCharacterText = richText(objectWithThatText."Attribute with That Text");
objectWichShallGetThePi."Attribute which shall get the PI" = richText(myPiCharacterText );
Should work
Best regards
Wolfgang
|
|
Re: Copy / retain symbols in dxl. Bob_Swan - Fri Feb 22 05:30:46 EST 2013 SystemAdmin - Thu Feb 21 11:54:08 EST 2013
Hi
Try:
string myPiCharacterText = richText(objectWithThatText."Attribute with That Text");
objectWichShallGetThePi."Attribute which shall get the PI" = richText(myPiCharacterText );
Should work
Best regards
Wolfgang
That does work, but is not what I was looking for. Sorry, I wasn't clear
I want to display the value on the screen, merged with another attribute's text.
what I have to work with is:-
AttrRange contains "-pi/2 to pi/2"
AttrValue contains "0 when at rest"
Screen/exported text is to display "Range -pi/2 to pi/2, 0 when at rest" (or similar for other ranges/values).
It looks as though DOORS can interpret/translate what it reads from an attribute correctly, but not when dealing with a user string.
I suppose I could create a scratch attribute to hold the final text, it just seems inelegant.
Bob Swan
|
|
Re: Copy / retain symbols in dxl. Peter_Albert - Fri Feb 22 07:03:47 EST 2013 Bob_Swan - Fri Feb 22 05:30:46 EST 2013
That does work, but is not what I was looking for. Sorry, I wasn't clear
I want to display the value on the screen, merged with another attribute's text.
what I have to work with is:-
AttrRange contains "-pi/2 to pi/2"
AttrValue contains "0 when at rest"
Screen/exported text is to display "Range -pi/2 to pi/2, 0 when at rest" (or similar for other ranges/values).
It looks as though DOORS can interpret/translate what it reads from an attribute correctly, but not when dealing with a user string.
I suppose I could create a scratch attribute to hold the final text, it just seems inelegant.
Bob Swan
displayRich "Range" (richText obj."AttrRange") "," (richText obj."AttrValue")
|
|
Re: Copy / retain symbols in dxl. Bob_Swan - Mon Feb 25 07:27:14 EST 2013 Peter_Albert - Fri Feb 22 07:03:47 EST 2013
displayRich "Range" (richText obj."AttrRange") "," (richText obj."AttrValue")
DOHH!!!
I got so focused on the richText, forgot to use displayRich.
Thanks, that's it.
|
|